import cn.appsys.dao.appcheck.AppCheckMapper;
import cn.appsys.dao.appinfo.AppInfoMapper;
import cn.appsys.dao.devuser.DevUserMapper;
import cn.appsys.pojo.AppInfo;
import cn.appsys.pojo.BackendUser;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import cn.appsys.dao.backenduser.BackendUserMapper;

import java.util.List;

@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = {"classpath:applicationContext-mybatis.xml"})
public class Mappertest {
    @Autowired
    private AppCheckMapper appcheck;

    @Autowired
    private DevUserMapper devUserMapper;

    @Autowired
    private BackendUserMapper backendUserMapper;

    @Autowired
    private AppInfoMapper appInfoMapper;
    @Test
    public void testQury(){
        System.out.println(appcheck);
        AppInfo ap=new AppInfo();
        ap.setId(49);
        ap.setStatus(5);
        appcheck.UpDateAppStatus(ap);
    }

    @Test
    public void testBackend() {
        System.out.println(backendUserMapper.getLoginBackendUser("admin"));
    }



    @Test
    public void testA() throws Exception {
        List<AppInfo> list = appInfoMapper.getAppInfoListNoCheck(null, 1, null, null,
                null, null, 5, 5);
        System.out.println(list.size());
    }
}
